package com.itheima.app;


import com.itheima.service.TeacherService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TeacherApp {
    public static void main(String[] args) {
        //1.解析配置文件 获得容器对象
        ApplicationContext teacherContext = new ClassPathXmlApplicationContext("application-teacher.xml");
        //2.从容器中获得bean对象
        TeacherService teaService = (TeacherService)teacherContext.getBean("teacherService");
        //3.使用
        teaService.save();
    }
}
